export function ifEnergyLessThan(lessThan) {
  return ({spawn}) => Game.spawns[`${spawn}`].room.energyAvailable <= lessThan;
}

export function ifEnergyBiggerThan(biggerThan) {
  return ({spawn}) => Game.spawns[`${spawn}`].room.energyAvailable > biggerThan;
}

export function existMyConstructionSite() {
  return ({spawn}) => Game.spawns[`${spawn}`].room.find(FIND_MY_CONSTRUCTION_SITES).length > 0;
}

export function conter() {
  return Game.time % 1 === 0;
}